﻿using System;
using System.Diagnostics.Contracts;

namespace NColony.Syndication.Receiver.Contracts
{
    /// <summary>
    /// Contract for <see cref="ISyndicationFeedItem"/>.
    /// </summary>
    [ContractClassFor(typeof(ISyndicationFeedItem))]
    public abstract class ISyndicationFeedItemContract : ISyndicationFeedItem
    {
        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>The title.</value>
        public string Title
        {
            get
            {
                Contract.Ensures(Contract.Result<string>() != null, "Title will never be null");

                return default(string);
            }

            set
            {
                Contract.Requires(value != null, "Title cannot be null");
            }
        }

        /// <summary>
        /// Gets or sets the publish date.
        /// </summary>
        /// <value>The publish date.</value>
        public DateTimeOffset PublishDate
        {
            get
            {
                return default(DateTimeOffset);
            }

            set
            {
            }
        }
    }
}
